home *** CD-ROM | disk | FTP | other *** search
- import javax.microedition.lcdui.Command;
- import javax.microedition.lcdui.CommandListener;
- import javax.microedition.lcdui.Displayable;
- import javax.microedition.lcdui.Form;
- import javax.microedition.lcdui.Image;
- import javax.microedition.lcdui.ImageItem;
-
- public class Intro extends Form implements CommandListener {
- MicroCalc midlet;
- private Image img;
- private CalcCanvas calcCanvas;
- private long startTime;
- boolean endLoop = false;
- Command exitCommand = new Command(Resources.getText(5), 7, 4);
- Command startCommand = new Command(Resources.getText(6), 1, 1);
- long timer;
- Intro$ForwardThread thread;
-
- public Intro(MicroCalc var1) {
- super(Resources.getText(0));
- this.midlet = var1;
- this.img = this.getImage("img/MicroCalc.png");
- this.calcCanvas = new CalcCanvas(this.midlet, this);
- ((Form)this).append(new ImageItem("SL45i/6688i", this.img, 3, (String)null));
- ((Displayable)this).addCommand(this.startCommand);
- ((Displayable)this).addCommand(this.exitCommand);
- ((Displayable)this).setCommandListener(this);
- this.timer = System.currentTimeMillis();
- this.thread = new Intro$ForwardThread(this);
- this.thread.suspendFlag = false;
- this.thread.start();
- }
-
- static CalcCanvas access$0(Intro var0) {
- return var0.calcCanvas;
- }
-
- public void commandAction(Command var1, Displayable var2) {
- if (var1 == this.exitCommand) {
- this.midlet.destroyApp(false);
- } else if (var1 == this.startCommand) {
- this.endLoop = true;
- this.midlet.display.setCurrent(this.calcCanvas);
- }
-
- }
-
- private Image getImage(String var1) {
- try {
- return Image.createImage("/" + var1);
- } catch (Exception var2) {
- return null;
- }
- }
- }
-